﻿@model thailandProject.Models.Pair<List<thailandProject.Models.EMAILSENT>, int>

@{
    ViewBag.Title = "View Emails";
}


<div id="Wrapper2">
    <div id="content_header">
        <div id="headerimage">
        </div>
        <div id="theheader">@ViewBag.Header</div>
    </div>
    <!-- Left Column begins here -->
    <aside id="sidebar-wrapper">
        <nav class="sidebar">
            <!-- CONTENT GOES HERE -->
            @if (Model.value1.Count > 0)
            {
                foreach(var email in Model.value1)
                {
                    <div>
                        <strong>@email.emailSubject</strong><br />
                        Date Sent: @email.emailDateSent <br /><br />
                        @Html.Raw(email.emailContent)
                    </div>
                    <hr />
                    <br />
                }
            }
            else
            {
                <p>No emails sent to this client.</p>
            }
            <br />
            @Html.ActionLink("Back", "ViewClient", new { clientId =  Model.value2})
        </nav>
    </aside>
    <!-- Right column begins here -->
    <article id="contents">
        
    </article>
    <!-- Right column ends here -->
</div>
<!-- Div wrapper2 ends here -->


<script type = "text/javascript">
    $(function () {
        $(".datepicker").datepicker();
    });
</script>